package megrez.oss.common;

import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 二元素元组
 *  
 * @author Lucky Yang
 * @since 0.0.1
 */
@EqualsAndHashCode
@ToString
public class Pair<A, B> {
    public final A value0;
    public final B value1;
    
    protected Pair(A value0, B value1) {
        this.value0 = value0;
        this.value1 = value1;
    }

    public static <A, B> Pair<A, B> with(A value0, B value1) {
        return new Pair<>(value0, value1);
    }
}
